//
//  SHOAuthWebView.swift
//  SHWeibo
//
//  Created by jingming wang on 16/7/24.
//  Copyright © 2016年 cpy.name. All rights reserved.
//

import UIKit

class SHOAuthWebView: UIWebView {
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        self.setupUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    private func setupUI() {
        
        let urlString = "https://api.weibo.com/oauth2/authorize?client_id=\(K_APPKEY)&redirect_uri=\(K_APPREDIRECT_URI)"
        
        let url = NSURL(string: urlString)
        
        guard let _url = url else {
            return
        }
        let request = NSURLRequest(URL: _url)
        
        self.loadRequest(request)
    }

}
